import React, { Component } from "react";

//导入antd-mobile组件
// import { Button, WhiteSpace, WingBlank } from "antd-mobile";

// 导入路由
import {
  HashRouter as Router,
  Route,
  Redirect,
  Switch,
} from "react-router-dom";

import Home from "./pages/Home";
import CityList from "./pages/CityList";
import NotFound from "./pages/NotFound";
import Map from "./pages/Map";
export default class App extends Component {
  render() {
    return (
      <Router>
        <Switch>
          {/* 路由重定向 */}
          <Route path="/" exact render={() => <Redirect to="/home" />}></Route>
          <Route path="/home" component={Home}></Route>
          <Route path="/citylist" component={CityList}></Route>
          <Route path="/map" component={Map}></Route>
          {/* 404页面 */}
          <Route path="*" component={NotFound}></Route>
        </Switch>
      </Router>
    );
  }
}
